﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog x-modal-dialog">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-fire" title=""></i>&nbsp;&nbsp;<span>学员列表&nbsp;-&nbsp;过滤查询</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>

    <form class="form-horizontal" method="GET" action="${ctx.host}/online-rounds/${roundCode}/rounds">

      <input type="hidden" name="filter" value="true" >
      <input type="hidden" name="code" value="${roundCode}">
      <input type="hidden" name="grouped" value="${grouped}">
      <input type="hidden" name="group" value="${group}">

      <div class="modal-body">

        <div class="form-group x-form-group">
          <label class="col-xs-3 control-label">学员名称</label>
          <div class="pull-left col-xs-7">
            <input type="text" class="form-control" name="name" value="${param.name}" placeholder="支持模糊查询"/>
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-3 control-label">联系电话</label>
          <div class="pull-left col-xs-7">
            <input type="text" class="form-control" name="mobile" value="${param.mobile}" placeholder="支持模糊查询"/>
          </div>
        </div>
          
        <c:if test="${empty persist.courseRoundGroup(roundCode)}">
          <div class="form-group x-form-group">
            <label class="col-xs-3 control-label">是否完善问卷调查</label>
            <div class="pull-left col-xs-7">
              <select name="investigated" class="form-control" data-selected="${param.investigated}" data-live-search="true" data-size="5">
                  <option value=""></option>
                  <option value="true">是</option>
                  <option value="false">否</option>
              </select>
            </div>
          </div>
        </c:if>
        
        <div class="form-group x-form-group">
            <label class="col-xs-3 control-label">是否上传二维码</label>
            <div class="pull-left col-xs-7">
              <select name="qrcodeStatus" class="form-control" data-selected="${param.qrcodeStatus}" data-live-search="true" data-size="5">
                  <option value=""></option>
                  <option value="true">是</option>
                  <option value="false">否</option>
              </select>
            </div>
          </div>

      </div>

      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">查询</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
      </div>

    </form>

  </div>
  
  <script src="${ctx.resource}/js/component/select2.min.js"></script>
  <script type="text/javascript">
    
    $(document).ready(function(){

        $('select[name="investigated"]').select2({
            placeholder : '请选择是否完善调查',
            minimumResultsForSearch : 5,
            allowClear : true
        });
        
        var selectedStatus = $('select[name="investigated"]').data('selected');
        $('select[name="investigated"]').select2('val', selectedStatus);
        
        $('select[name="qrcodeStatus"]').select2({
            placeholder : '请选择上传二维码',
            minimumResultsForSearch : 5,
            allowClear : true
        });
        
        var selectedStatus = $('select[name="qrcodeStatus"]').data('selected');
        $('select[name="qrcodeStatus"]').select2('val', selectedStatus);

    })
    
  </script>

</div>